package cn.cdyx.common.config;

import cn.cdyx.common.cache.TbsysTablesCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @Author Watermelon
 * @Date 2023-01-14 17:32
 * 定时任务后期重新处理
 */
@Configuration
@EnableScheduling
public class ScheduleConfig {
    @Autowired
    private TbsysTablesCache tbsysTablesCache;
    @Scheduled(cron = "0 0,10,20,30,40,50 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * ?")
    private void Tasks(){
        tbsysTablesCache.initData();
    }
}
